<?php

/*
 *    Document   : test
 *   Created on : May 24, 2011, 5:12:54 PM
 *    Author     : ClarkT AKA FalleN
 *    Company    : Amodity
 *    Web        : http://www.amodity.com
 *    Copyright  : 2011
 */

class Test extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->library('auth');
        $this->_prev_url();
    }

    function index() {

        $this->template->set('title', 'dev controller');
        $this->template->load('site/template', 'dev/test');
    }

    function _prev_url() {
        //set previous url
        if (isset($_SERVER['HTTP_REFERER'])) {
            $this->session->set_userdata('prev_url', $_SERVER['HTTP_REFERER']);
        } else {
            $this->session->set_userdata('prev_url', base_url());
        }
    }

}

?>
